package com.example.beauty.controller;

import com.example.beauty.resp.RespModel;
import com.example.beauty.service.ProjectService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author qin
 * @create 2022--09--07--16:17
 */
@RestController
@RequestMapping("/project")
public class ProjectController {
    @Resource
    private ProjectService projectService;

    @GetMapping("/all")
    public RespModel getAllProject(int pageNum, int limit){
        System.out.println("pageNum:"+pageNum+"，limit:"+limit);
        return projectService.getAllProject(pageNum,limit);
    }

    @GetMapping("/byId")
    public RespModel byId(int id){
        System.out.println(id);
        return projectService.getById(id);
    }
}
